import request from '@/utils/request';

import axios from 'axios';

export function addScoreOrg(name) {
    return request({
        url: `/score/addScoreOrg.do/${name}`,
        method: 'post'
    });
}
export function getScoreOrgList(pageInfo) {
    return request({
        url: `/score/getScoreOrgList.do`,
        method: 'post',
        data: pageInfo
    });
}

export function upForwardOrg(id) {
    return request({
        url: `/score/upForwardOrg.do/${id}`,
        method: 'post'
    });
}

export function downForwardOrg(id) {
    return request({
        url: `/score/downForwardOrg.do/${id}`,
        method: 'post'
    });
}

export function editScoreOrg(scoreOrgInfo) {
    return request({
        url: `/score/editScoreOrg.do`,
        method: 'post',
        data: scoreOrgInfo
    });
}

export function deleteScoreOrg(orgId) {
    return request({
        url: `/score/deleteScoreOrg.do/${orgId}`,
        method: 'delete'
    });
}

export function addNewModel(modelInfo) {
    return request({
        url: `/score/addNewModel.do`,
        method: 'post',
        data: modelInfo
    });
}

export function deleteScoreModel(modelId) {
    return request({
        url: `/score/deleteScoreModel.do/${modelId}`,
        method: 'delete'
    });
}

export function getModelList(modelInfo) {
    return request({
        url: `/score/getModelList.do`,
        method: 'post',
        data: modelInfo
    });
}

export function getUseableModelList(modelInfo) {
    return request({
        url: `/score/getUseableModelList.do`,
        method: 'post',
        data: modelInfo
    });
}

export function editModelName(modelInfo) {
    return request({
        url: `/score/editModelName.do`,
        method: 'post',
        data: modelInfo
    });
}

export function getScoreModelOrgInfo(id) {
    return request({
        url: `/score/getScoreModelOrgInfo.do/${id}`,
        method: 'post'
    });
}

export function addScoreModelOrgLink(linkInfo) {
    return request({
        url: `/score/addScoreModelOrgLink.do`,
        method: 'post',
        data: linkInfo
    });
}

export function addAllScoreModelOrgLink(modelId) {
    return request({
        url: `/score/addAllScoreModelOrgLink.do/${modelId}`,
        method: 'post'
    });
}

export function removeScoreModelOrgLink(linkInfo) {
    return request({
        url: `/score/removeScoreModelOrgLink.do`,
        method: 'post',
        data: linkInfo
    });
}

export function removeAllScoreModelOrgLink(modelId) {
    return request({
        url: `/score/removeAllScoreModelOrgLink.do/${modelId}`,
        method: 'post'
    });
}

export function getScoreModelItemInfo(id) {
    return request({
        url: `/score/getScoreModelItemInfo.do/${id}`,
        method: 'post'
    });
}

export function addScoreModelItem(itemInfo) {
    return request({
        url: `/score/addScoreModelItem.do`,
        method: 'post',
        data: itemInfo
    });
}

export function upwardScoreModelItem(id) {
    return request({
        url: `/score/upwardScoreModelItem.do/${id}`,
        method: 'post'
    });
}

export function downwardScoreModelItem(id) {
    return request({
        url: `/score/downwardScoreModelItem.do/${id}`,
        method: 'post'
    });
}

export function editScoreModelItem(itemInfo) {
    return request({
        url: `/score/editScoreModelItem.do`,
        method: 'post',
        data: itemInfo
    });
}
export function deleteScoreModelItem(itemId) {
    return request({
        url: `/score/deleteScoreModelItem.do/${itemId}`,
        method: 'delete'
    });
}

export function addScoreModelItemOption(optionInfo) {
    return request({
        url: `/score/addScoreModelItemOption.do`,
        method: 'post',
        data: optionInfo
    });
}

export function getOptionsByModelId(modelId) {
    return request({
        url: `/score/getOptionsByModelId.do/${modelId}`,
        method: 'post'
    });
}

export function deleteScoreModelItemOption(id) {
    return request({
        url: `/score/deleteScoreModelItemOption.do/${id}`,
        method: 'delete'
    });
}

export function updateScoreModelItemOption(optionInfo) {
    return request({
        url: `/score/updateScoreModelItemOption.do`,
        method: 'post',
        data: optionInfo
    });
}

export function upwardScoreModelItemOption(id) {
    return request({
        url: `/score/upwardScoreModelItemOption.do/${id}`,
        method: 'post'
    });
}

export function downwardScoreModelItemOption(id) {
    return request({
        url: `/score/downwardScoreModelItemOption.do/${id}`,
        method: 'post'
    });
}

export function addNewScoreTask(taskInfo) {
    return request({
        url: `/score/addNewScoreTask.do`,
        method: 'post',
        data: taskInfo
    });
}

export function getScoreTaskList(queryInfo) {
    return request({
        url: `/score/getScoreTaskList.do`,
        method: 'post',
        data: queryInfo
    });
}

export function deleteScoreTask(taskId) {
    return request({
        url: `/score/deleteScoreTask.do/${taskId}`,
        method: 'delete'
    });
}

export function getScoreTaskOrgInfo(taskId) {
    return request({
        url: `/score/getScoreTaskOrgInfo.do/${taskId}`,
        method: 'get'
    });
}

export function addScoreTaskOrgLink(linkInfo) {
    return request({
        url: `/score/addScoreTaskOrgLink.do`,
        method: 'post',
        data: linkInfo
    });
}

export function addAllScoreTaskOrgLink(taskId) {
    return request({
        url: `/score/addAllScoreTaskOrgLink.do/${taskId}`,
        method: 'post'
    });
}

export function removeScoreTaskOrgLink(linkInfo) {
    return request({
        url: `/score/removeScoreTaskOrgLink.do`,
        method: 'post',
        data: linkInfo
    });
}

export function removeAllScoreTaskOrgLink(taskId) {
    return request({
        url: `/score/removeAllScoreTaskOrgLink.do/${taskId}`,
        method: 'post'
    });
}

export function getScoreMarkOrgInfo(taskId) {
    return request({
        url: `/score/getScoreMarkOrgInfo.do/${taskId}`,
        method: 'get'
    });
}

export function getSingleScoreMark(info) {
    return request({
        url: `/score/getSingleScoreMark.do`,
        method: 'post',
        data: info
    });
}

export function setScoreMark(markInfo) {
    return request({
        url: `/score/setScoreMark.do`,
        method: 'post',
        data: markInfo
    });
}

export function clearScoreTaskItem(taskId) {
    return request({
        url: `/score/clearScoreTaskItem.do/${taskId}`,
        method: 'delete'
    });
}

export function clearScoreOrgTaskItem(info) {
    return request({
        url: `/score/clearScoreOrgTaskItem.do`,
        method: 'delete',
        data: info
    });
}

export function clearScoreOrgItem(info) {
    return request({
        url: `/score/clearScoreOrgItem.do`,
        method: 'delete',
        data: info
    });
}